# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=msgpack-c
pkgver=4.0.0
pkgrel=0
pkgdesc="An efficient object serialization library for C"
url="https://msgpack.org"
arch="all"
license="BSL-1.0"
makedepends="cmake samurai"
checkdepends="gtest-dev zlib-dev"
subpackages="$pkgname-dev"
source="https://github.com/msgpack/msgpack-c/releases/download/c-$pkgver/msgpack-c-$pkgver.tar.gz"

build() {
	cmake -G Ninja -B build . \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_VERBOSE_MAKEFILE=TRUE
	cmake --build build
}

check() {
	cmake --build build --target test
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
472056ae5aeed21c706aaeb4c380771156cd5d88d59c6fdac89e4a9bb7bc656e0f5ff0bfa141a9cfed749e973b545e57de47608da45acb1a049d0f267113dcc6  msgpack-c-4.0.0.tar.gz
"
